    /***
     * @description axios封装
     * @file api.ts
     * @author andy
     * @date 2024/3/22 16:40
     */
// file:api.s
// 1、导入axios以及拦截器
import service from './request'

// demo接口1
export const demo1 = (data:any) => {
    return service({
        url: '/user/user/demo1/' + data,
        method: 'post'
    })
};


// demo接口2
export const demo2 = (data:any) => {
    return service({
        url: '/user/user/demo2',
        method: 'post',
        data
    })
};
// demo接口2  登录接口
export const login = (data:any) => {
    return service({
        url: '/user/index/login',
        method: 'post',
        data
    })
};
// demo接口2  获取用户树性菜单
export const getMenuTree = () => {
    return service({
        url: '/user/index/getMenuTree',
        method: 'post',
    })
};
// demo接口2  分页获取用户列表
export const getUserList = (data:any) => {
    return service({
        url: '/user/index/getUserList',
        method: 'post',
        data
    })
};
// demo接口2  修改用户
export const updateUser = (data:any) => {
    return service({
        url: '/user/index/updateUser',
        method: 'post',
        data
    })
};
// demo接口1  根据用户id删除用户
export const deleteUser = (userId:number) => {
    return service({
        url: '/user/index/deleteUser/' + userId,
        method: 'post'
    })
};
// demo接口2  批量删除用户
export const deleteAllUser = (data:any) => {
    return service({
        url: '/user/index/deleteAllUser',
        method: 'post',
        data
    })
};
// demo接口2  审核商户
export const checkUser = (data:any) => {
    return service({
        url: '/user/index/checkUser',
        method: 'post',
        data
    })
};
// demo接口2  品牌分页列表
export const getBrandList = (data:any) => {
    return service({
        url: '/shop/index/getBrandList',
        method: 'post',
        data
    })
};
// demo接口2  添加品牌 
export const addBrand = (data:any) => {
    return service({
        url: '/shop/index/addBrand',
        method: 'post',
        data
    })
};
// demo接口2  改变表格状态 
export const updateBrand = (data:any) => {
    return service({
        url: '/shop/index/updateBrand',
        method: 'post',
        data
    })
};
// demo接口2  获取商品类型的树形结构 
export const getTypeTree = () => {
    return service({
        url: '/shop/type/getTypeTree',
        method: 'get',
    })
};
// demo接口1  修改类型状态
export const setTypeStatus = (typeId:number,typeStatus:number) => {
    return service({
        url: '/shop/type/setTypeStatus/'+typeId+'/'+typeStatus,
        method: 'post'
    })
};
// demo接口1  根据用户id删除用户
export const deleteTypeById = (typeId:number) => {
    return service({
        url: '/shop/type/deleteTypeById/' + typeId,
        method: 'post'
    })
};
// demo接口2  添加商品类型 
export const addType = (data:any) => {
    return service({
        url: '/shop/type/addType',
        method: 'post',
        data
    })
};
// demo接口2  修改商品类型 
export const updateType = (data:any) => {
    return service({
        url: '/shop/type/updateType',
        method: 'post',
        data
    })
};
// demo接口2  获取商品分页列表 
export const getProdList = (data:any) => {
    return service({
        url: '/shop/prod/getProdList',
        method: 'post',
        data
    })
};
// demo接口2  添加商品 
export const addProd = (data:any) => {
    return service({
        url: '/shop/prod/addProd',
        method: 'post',
        data
    })
};
// demo接口2  获取商品类型的树形结构 (用于下拉框)
export const getTypeSelectTree = () => {
    return service({
        url: '/shop/type/getTypeSelectTree',
        method: 'get',
    })
};
// demo接口2  获取素有品牌的列表 
export const getBrandListAll = () => {
    return service({
        url: '/shop/brand/getBrandListAll',
        method: 'post',
    })
};
// demo接口2  获取素有单位的列表 
export const getUnitList = () => {
    return service({
        url: '/shop/unit/getUnitList',
        method: 'post',
    })
};
// demo接口2  获取素有标签的列表 
export const getTagList = () => {
    return service({
        url: '/shop/tag/getTagList',
        method: 'post',
    })
};
// demo接口2  获取素有供应商的列表 
export const getApprList = () => {
    return service({
        url: '/shop/appr/getApprList',
        method: 'post',
    })
};
// demo接口2  批量删除商品 
export const deleteAllProd = (data:any) => {
    return service({
        url: '/shop/prod/deleteAllProd',
        method: 'post',
        data
    })
};


